<template>
	<view class="p-2">
		<u-navbar title="消息" placeholder autoBack></u-navbar>
		<template v-if="list.length">
			<view class="" v-for="(item,index) in list" :key="index">
				<view class="flex align-center justify-center font-24 text-light6" style="height: 90rpx;">
					{{item.createtime}}
				</view>
				<view class="bg-white p-2 font-28 text-main">
					{{item.content}}
				</view>
			</view>
		</template>
		<template v-else>
			<u-empty mode="message" marginTop="150"></u-empty>
		</template>
		
		
	</view>
</template>

<script>
	export default{
		data(){
			return{
				list:[]
			}
		},
		onLoad() {
			this.getData()
		},
		methods:{
			getData(){
				this.$api.message().then(res=>{
					if(res.code === 1){
						this.list = res.data
					}
				})
			}
		}
	}
</script>

<style>
</style>